﻿const config = {
  dev: {
    downloadUrl: '//m.boqii.com/appdown.html?fromPage=webapp',
    questionDetail: (id) => `https://mtest.boqii.com/app/find/apps/wenda_detail.html?UserId=&QAId=${id}&fromPage=webapp
    `,
    interactDetail: (id) => `http://mtest.boqii.com/MobileApp/interactive.html?quan_id=${id}&fromPage=webapp
    `,
    noteDetail: (id) => `http://mtest.boqii.com/MobileApp/notedetail.html?quan_id=${id}&fromPage=webapp
    `,
    activitydetailList: (id) => `http://mtest.boqii.com/MobileApp/activitydetailList.html?quan_id=${id}&fromPage=webapp
    `,
    articledetail: (id) => `http://mtest.boqii.com/MobileApp/articledetail.html?article_id=${id}&fromPage=webapp`,
    baike: 'http://m.boqii.com/baike?fromPage=webapp',
    eshop: 'https://stest.boqii.com?fromPage=webapp',
    service: 'https://vtest.boqii.com?fromPage=webapp',
    profile: 'https://stest.boqii.com/personal.html?fromPage=webapp',
    bangdan: 'https://mtest.boqii.com/MobileApp/notedetailList.html?fromPage=webapp&from=singlemessage&isappinstalled=0',
    clickGoDetails(id, type) {
      switch (type) {
        case 'ACTIVITY':
          return `http://mtest.boqii.com/MobileApp/petactivities.html?quan_id=${id}&source=h5&fromPage=webapp`;
        case 'SUBJECT':
          return `http://stest.boqii.com/MobileApp/activitydetailList.html?quan_id=${id}&source=h5&fromPage=webapp`;
        case 'NOTE':
          return `http://stest.boqii.com/MobileApp/notedetail.html?quan_id=${id}&source=h5&fromPage=webapp`;
        case 'QUESTION':
          return `https://mtest.boqii.com/app/find/apps/wenda_detail.html?UserId=&QAId=${id}&source=h5&fromPage=webapp`;
        case 'EVALUATION':
          return `http://stest.boqii.com/MobileApp/notedetail.html?quan_id=${id}&source=h5&fromPage=webapp`;
        case 'TAG':
        case 'SHOPPINGMALL':
          return `http://stest.boqii.com/detail.html?GoodsId=${id}&fromPage=webapp`;
        case 'SERVICE':
          return `http://v.boqii.com/merchant/${id}?fromPage=webapp`;
      }
    }
  },
  prd: {
    downloadUrl: '//m.boqii.com/appdown.html?fromPage=webapp',
    questionDetail: (id) => `https://m.boqii.com/app/find/apps/wenda_detail.html?UserId=&QAId=${id}&fromPage=webapp`,
    interactDetail: (id) => `http://m.boqii.com/MobileApp/interactive.html?quan_id=${id}&fromPage=webapp`,
    noteDetail: (id) => `http://m.boqii.com/MobileApp/notedetail.html?quan_id=${id}&fromPage=webapp`,
    activitydetailList: (id) => `http://m.boqii.com/MobileApp/activitydetailList.html?quan_id=${id}&fromPage=webapp`,
    articledetail: (id) => `http://m.boqii.com/MobileApp/articledetail.html?article_id=${id}&fromPage=webapp`,
    baike: 'https://m.boqii.com/baike?fromPage=webapp',
    eshop: 'https://s.boqii.com?fromPage=webapp',
    service: 'https://v.boqii.com?fromPage=webapp',
    profile: 'https://s.boqii.com/personal.html?fromPage=webapp',
    bangdan: 'https://m.boqii.com/MobileApp/notedetailList.html?fromPage=webapp&from=singlemessage&isappinstalled=0',
    clickGoDetails(id, type) {
      switch (type) {
        case 'ACTIVITY':
          return `http://m.boqii.com/MobileApp/petactivities.html?quan_id=${id}&source=h5&fromPage=webapp`;
        case 'SUBJECT':
          return `http://s.boqii.com/MobileApp/activitydetailList.html?quan_id=${id}&source=h5&fromPage=webapp`;
        case 'NOTE':
          return `http://s.boqii.com/MobileApp/notedetail.html?quan_id=${id}&source=h5&fromPage=webapp`;
        case 'QUESTION':
          return `https://m.boqii.com/app/find/apps/wenda_detail.html?UserId=&QAId=${id}&source=h5&fromPage=webapp`;
        case 'EVALUATION':
          return `http://s.boqii.com/MobileApp/notedetail.html?quan_id=${id}&source=h5&fromPage=webapp`;
        case 'TAG':
        case 'SHOPPINGMALL':
          return `http://s.boqii.com/detail.html?GoodsId=${id}&fromPage=webapp`;
        case 'SERVICE':
          return `http://v.boqii.com/merchant/${id}?fromPage=webapp`;
      }
    }
  }
}
console.log("-----------ENV------------", ENV)
export default config[ENV];
